From: Keir Fraser Date: Mon, 7 Jun 2010 06:38:09 +0000 (+0100) Subject: AMD: Workaround for erratum 411 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12001 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=81265c2af93866eb909491fe294fe343ca0c1e60;p=xen.git AMD: Workaround for erratum 411 Clear APIC TMICT when we mask APIC LVTT. Signed-off-by: Wei Wang --- diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index bd3ae1a49a..248d373667 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -195,6 +195,9 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); + /* Work around AMD Erratum 411. This is a nice thing to do anyway. */ + apic_write_around(APIC_TMICT, 0); + /* * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. @@ -1184,7 +1187,10 @@ void disable_APIC_timer(void) { if (using_apic_timer) { unsigned long v; - + + /* Work around AMD Erratum 411. This is a nice thing to do anyway. */ + apic_write_around(APIC_TMICT, 0); + v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); } diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index e67e5ce5d3..47cc82ea21 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -662,8 +662,7 @@ void hpet_broadcast_enter(void) spin_unlock(&ch->lock); } - /* Cancel any outstanding LAPIC timer event and disable interrupts. */ - reprogram_timer(0); + /* Disable LAPIC timer interrupts. */ disable_APIC_timer(); spin_lock(&ch->lock);